package com.lnj.messages.configs;

import dev.langchain4j.community.model.dashscope.QwenEmbeddingModel;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class AiConfig {
    @Value("${langchain4j.open-ai.community.dashscope.api-key}")
    private String ALI_AI_KEY;
    @Bean
    public QwenEmbeddingModel qwenEmbeddingModel() {
        return QwenEmbeddingModel.builder()
                .apiKey(ALI_AI_KEY)
                .build();
    }
}
